.container {
  padding: 0 8px;
}

.orderWrapper {
  position: relative;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  border: 1px solid #f0f0f0;
  background: #fff;
  overflow: hidden;

  &:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #1890ff;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  }

  &.hovered {
    border-color: #d9d9d9;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);

    &:before {
      transform: scaleY(1);
    }

    .orderNumber {
      color: #096dd9 !important;
    }

    .collapseIcon {
      color: #096dd9;
    }
  }

  &.active {
    border-color: #1890ff;
    box-shadow: 0 3px 16px rgba(24, 144, 255, 0.12);

    &:before {
      transform: scaleY(1);
      background: #52c41a;
    }
  }
}

.orderCollapse {
  background: transparent;

  .ant-collapse-item {
    border: none !important;
  }

  .ant-collapse-content {
    border-top: 1px dashed #f0f0f0;
    background-color: #fafafa;
  }
}

.collapseIcon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  transition: all 0.3s;

  &.rotated {
    transform: translateY(-50%) rotate(90deg);
    color: #52c41a;
  }
}

.orderPanel {
  position: relative;

  .ant-collapse-header {
    padding: 16px 40px 16px 16px !important;
    cursor: pointer !important;
  }
}

.cardHeader {
  width: 100%;

  .headerContent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;

    .orderNumber {
      color: #1890ff;
      font-size: 15px;
      transition: color 0.2s;
    }

    .orderIndex {
      background: #f5f5f5;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 12px;
    }
  }

  .orderTitle {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 500;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .orderSummary {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;

    .orderAmount {
      font-size: 15px;
    }
  }
}

.orderDetails {
  padding: 8px 16px 16px;

  .ant-descriptions-item-label {
    width: 80px;
    color: #666;
  }

  .detailDivider {
    margin: 12px 0;
    border-color: #f0f0f0;
  }

  .detailTitle {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
  }

  .productItem {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;

    &:last-child {
      border-bottom: none;
    }

    .productName {
      color: #333;
    }

    .productPrice {
      color: #666;
    }
  }
}

.divider {
  margin: 16px 0;
  border-color: #f0f0f0;
}

.totalSection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 4px;
  border: 1px solid #f0f0f0;

  .totalAmount {
    margin: 0;

    .ant-typography {
      margin-left: 8px;
    }
  }
}
